-
Notifications
You must be signed in to change notification settings - Fork 174
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bugfix: pyTenable crashes if srcInterface or dstInterface not null #753
Conversation
Addressed a bug causing a crash in when events->srcInterface or events->dstInterface was not null upon query completion. The issue was traced back to incorrect usage of the marshmallow package. Note: In Tenable.OT version 3.17, a bug existed where events->srcInterface and dstInterface consistently returned null. Due to this behavior, the current bug did not manifest itself during that version Additionally, added the retrieval of required nodes from dstInterface, ensuring that all necessary nodes are now properly obtained.
|
||
|
||
@dataclass | ||
class IP: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use this class also in tenable/ot/schema/events.py line:124 (dst_ip) and on line:139 (src_ip)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
@saizinbud The changes look good to me. Could you also add tests? |
* Add srcInterface and dstInterface fields to OT test * Revert change of last commit - dst_ip, src_ip should remain IPv4Address and cannot be converted to IP class * Change directAsset field of NetworkInterface to ID class * Move ID, IDList classes to base.py * Remove Lists from src_interface and dst_interface - These fields cannot return lists
Description
Addressed a bug causing a crash in when events->srcInterface or events->dstInterface was not null upon query completion. The issue was traced back to incorrect usage of the marshmallow package.
Note: In Tenable.OT version 3.17, a bug existed where events->srcInterface and dstInterface consistently returned null. Due to this behavior, the current bug did not manifest itself during that version
Additionally, added the retrieval of required nodes from dstInterface, ensuring that all necessary nodes are now properly obtained.
Type of change
How Has This Been Tested?
Run local tests and tested against a Tenable.OT machine
Test Configuration: